Package-level declarations
Functions
Link copied to clipboard
fun <Model> FormController<Model>.FormTimeField(modelProperty: KMutableProperty<LocalTime?>, initialValue: LocalTime? = null, validator: Validator<LocalTime>? = modelProperty.validator(), enabled: Boolean = true, invalidTimeMessage: Any = "Invalid time format", cleanTime: (String) -> String = { sanitizeTime(it) }, implementation: FormFieldImplementation<TextFieldValue>)
fun <Model> FormController<Model>.FormTimeField(modelProperty: KMutableProperty<LocalTime?>, initialValue: LocalTime? = null, validator: Validator<LocalTime>? = modelProperty.validator(), enabled: Boolean = true, cleanTime: (String) -> String = { sanitizeTime(it) }, modifier: Modifier = Modifier.fillMaxWidth(), hint: Any? = modelProperty.hint(), placeholder: Any? = null, isLast: Boolean = false, leadingIcon: @Composable () -> Unit? = null, timePickerState: TimePickerState = rememberTimePickerState(), allowTyping: Boolean = true, entry: @Composable (controller: PickerController<TimePickerState>, value: TextFieldValue, setValue: (TextFieldValue) -> Unit) -> Unit = { controller, value, setValue ->
DefaultPickerTextEntry(
value = value,
setValue = setValue,
modifier = modifier,
hint = hint,
isLast = isLast,
leadingIcon = leadingIcon,
placeholder = placeholder,
controller = controller,
allowTyping = allowTyping,
trailingIconImage = Icons.Timer,
)
}, dialog: @Composable (controller: PickerController<TimePickerState>, onTimePicked: (LocalTime) -> Unit) -> Unit = { controller, onTimePicked ->
DefaultTimePickerDialog(
controller,
onTimePicked = onTimePicked,
)
}, invalidTimeMessage: Any = "Invalid time format")